public class demo3 {
    //锁的可重入性
    //日常写代码中有时方法调用多了难免出现上述情况，所以锁的可重入性就显得十分重要
    private  Object locker = new Object();
    public void fun1(){
        synchronized (locker){
            fun2();
        }
    }

    private void fun2() {
        fun3();
    }

    private void fun3() {
        synchronized (locker){
            synchronized (locker){

            }
        }
    }

    public static void main(String[] args) {

    }
}
